package com.amado.course42Nio.demo2;

import java.nio.ByteBuffer;

/**
 * @author wangyulong
 * @version 1.5.0
 * @date 2020/3/8 13:05
 */
public class Buffers {
    private ByteBuffer readBuffer;
    private ByteBuffer writeBuffer;

    public Buffers(int readBufferLength, int writeBufferLength) {
        this.readBuffer = ByteBuffer.allocate(readBufferLength);
        this.writeBuffer = ByteBuffer.allocate(writeBufferLength);
    }

    public ByteBuffer getReadBuffer() {
        return readBuffer;
    }

    public void setReadBuffer(ByteBuffer readBuffer) {
        this.readBuffer = readBuffer;
    }

    public ByteBuffer getWriteBuffer() {
        return writeBuffer;
    }

    public void setWriteBuffer(ByteBuffer writeBuffer) {
        this.writeBuffer = writeBuffer;
    }
}
